    /**
 * Created by CodeTlan.
 * User: hellreuter
 * Date: 3/11/12
 * Time: 5:00 PM
 */
Ext.define('CT.view.trabajador.AddDepGrid', {
    extend: 'Ctc.view.Grid',
    alias: 'widget.gridadddep',
    store: 'AddDepartamentos',
    hideHeaders: true,
    initComponent:function(){
        this.callParent(arguments);

        this.store.setParams({trabajador_k:this.trabajador_k},true);
    },
    buildColumns: function(){
        return [
            {xtype: 'rownumberer'},
            {header: 'Departamentos', dataIndex: 'departamento', flex: 9},
            {header: 'Eliminar', flex: 1, renderer: this._renderEliminar, iconCls:'cancel'}
        ];
    },
    buildTbar: function(){
        return ["Seleccione el departamento: ",{
            xtype: 'combodepartamentos',
            flex:1
        },{
            xtype: 'button',
            text:  'Agregar',
            iconCls: 'add',
            itemId: 'btnAddDepartamentos',
            disabled: true,
            action: 'insertDep'
        }];
    },
    _renderEliminar:function(){
        return "<img src='img/icons/16/del.png' style='cursor:pointer'>";
    }
});